//
//  BQNavViewCommon.m
//  Adorable_Things
//
//  Created by ybq on 16/1/14.
//  Copyright © 2016年 Banana Inc. All rights reserved.
//

#import "BQNavViewCommon.h"

@implementation BQNavViewCommon

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/


- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        _backButton = [UIButton buttonWithType:(UIButtonTypeCustom)];
        _backButton.frame = CGRectMake(10, 10, 25, 25);
        [_backButton setImage:[UIImage imageNamed:@"iconfont-fanhui"] forState:(UIControlStateNormal)];
        [self addSubview:_backButton];
        
        _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake((kWidth - 120) / 2, 10, 120, 25)];
        _titleLabel.font = [UIFont systemFontOfSize:19];
        _titleLabel.textAlignment = NSTextAlignmentCenter;
        [self addSubview:_titleLabel];
        
        _checkin_RuleButton = [UIButton buttonWithType:(UIButtonTypeCustom)];
        _checkin_RuleButton.frame = CGRectMake(kWidth - 80, 15, 60, 15);
        _checkin_RuleButton.titleLabel.font = [UIFont systemFontOfSize:15];
        _checkin_RuleButton.titleLabel.textColor = [UIColor redColor];
        _checkin_RuleButton.hidden = YES;
        [self addSubview:_checkin_RuleButton];
        
        UIImageView *line = [[UIImageView alloc] initWithFrame:CGRectMake(0, frame.size.height - .5, kWidth, .5)];
        line.backgroundColor = [UIColor lightGrayColor];
        [self addSubview:line];
    }
    return self;
}

@end
